<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Lab 3</title>
    <script src="main.js"></script>
    <script>
        window.onload = function () {
            var request = getXmlHttp();
            var send = document.getElementById("send");

            send.onclick = function () {
                var a = document.getElementById("a").value;
                var b = document.getElementById("b").value;
                var c = document.getElementById("c").value;
                var send_post_data = "a="+a+"&b="+b+"&c="+c;
               // alert(send_post_data)
                request.onreadystatechange=function()
                {
                    if (request.readyState==4 && request.status==200)
                    {
                        document.getElementById("response").innerHTML=request.responseText;
                    }
                }
                request.open("POST","file.php",true);
                request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
                request.send(send_post_data);

            }
        }
    </script>
</head>
<body>
<a href="jquery.php">JQUERY</a>
<form action="file.php" method="post">
    <div>a = <input id="a" type="text" name="a"></div>
    <div>b = <input id="b" type="text" name="b"></div>
    <div>c = <input id="c" type="text" name="c"></div>
    <div><input id="send" type="button" value="Send"></div>
</form>
<div id="response">
</div>
</body>
</html>